package Level02;

import javax.swing.plaf.synth.SynthOptionPaneUI;
import java.util.ArrayList;

public class Three {
    public static void main(String[] args) {
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("11");
        arrayList.add("33");
        arrayList.add("55");
        arrayList.add("77");
        //第一种将集合转为数组的方法
        System.out.println(arrayList.toArray());
        //第二种将集合转为数组的方法
        String[] strings = new String[arrayList.size()];
        System.out.println(arrayList.toArray(strings));
    }
}
